ArrowIcon

open class ArrowIcon : Icon

ArrowIcon is an icon with given arrow shape, defined by the direction, enable status, and size (length and width).

Here's a diagram:

     A
     |\
     | \
     C--E
     | /
     |/
     B

where distance C - E is the length of the arrow, while distance A - B is the width of the arrow. A width of zero is not allowed, but a length of zero is allowed and creates a bar of the specified width.

When a triangle shape is selected, the ArrowHead class is used to draw the triangle.

Author

Kevin Menningen

Constructors

Link copied to clipboard
constructor(direction: Int, isEnabled: Boolean)
Create an ArrowIcon with the given direction and enablement status and the default size and length.
constructor(direction: Int, isEnabled: Boolean, length: Int, width: Int)
Create an ArrowIcon with given direction, enable status, shape, and size.

Properties

Link copied to clipboard
val EAST: Int = 3
The arrow should point to the east.
Link copied to clipboard
val NORTH: Int = 1
The arrow should point to the north.
Link copied to clipboard
val SOUTH: Int = 5
The arrow should point to the south.
Link copied to clipboard
val WEST: Int = 7
The arrow should point to the west.

Functions

Link copied to clipboard
open fun getDirection(): Int
Get the arrow icon direction.
Link copied to clipboard
open fun getIconHeight(): Int
Returns the icon's height.
Link copied to clipboard
open fun getIconWidth(): Int
Returns the icon's width.
Link copied to clipboard
open fun paintIcon(comp: Component, graphics: Graphics, xValue: Int, yValue: Int)
Draw the icon.
Link copied to clipboard
open fun setEnabled(isEnabled: Boolean)
Set the enable status.